question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help using InfraValidator locally on OS X

See original GitHub issue

We are trying to use InfraValidator, running locally on OS X (mac machine specs, etc.) with BeamDagRunner, like so:

    infra_validator = InfraValidator(
        model=trainer.outputs["model"],
        examples=example_gen.outputs["examples"],
        serving_spec=infra_validator_pb2.ServingSpec(
            tensorflow_serving=infra_validator_pb2.TensorFlowServing(tags=["latest"]),
            local_docker=infra_validator_pb2.LocalDockerConfig(),
        ),
        request_spec=infra_validator_pb2.RequestSpec(
            tensorflow_serving=infra_validator_pb2.TensorFlowServingRequestSpec()
        ),
    )
    components.append(infra_validator)

The docker container seems to start, but then stops, fails, and gives the following error log:

INFO:absl:Starting infra validation (attempt 1/5).
INFO:absl:Starting LocalDockerRunner(image: tensorflow/serving:latest).
INFO:absl:Running container with parameter {'auto_remove': True, 'detach': True, 'publish_all_ports': True, 'image': 'tensorflow/serving:latest', 'environment': {'MODEL_NAME': 'infra-validation-model', 'MODEL_BASE_PATH': '/model'}, 'mounts': [{'Target': '/model/infra-validation-model/1', 'Source': '/var/folders/l4/pwtkmm_11xd9lnrq5t0yghdh0000gn/T/beam_testt6n8xs2i/tfx_pipeline_output/autotagging-de-tfx-full-run/.temp/6/infra-validation-model/1606931336', 'Type': 'bind', 'ReadOnly': True}]}
INFO:absl:Stopping LocalDockerRunner(image: tensorflow/serving:latest).
ERROR:absl:Infra validation (attempt 1/5) failed.
Traceback (most recent call last):
  File "/Users/adu27/.local/share/virtualenvs/training-vsRZzzSA/lib/python3.6/site-packages/docker/api/client.py", line 268, in _raise_for_status
    response.raise_for_status()
  File "/Users/adu27/.local/share/virtualenvs/training-vsRZzzSA/lib/python3.6/site-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http+docker://localhost/v1.40/containers/create

We assumed that maybe the LocalDockerConfig needed more set up, so we tried to set client_base_url, but couldn’t really figure out what this was supposed to be. We’ve tried client_base_url as unix://var/run/docker.sock, unix:///var/run/docker.sock (note three /s), and http://host.docker.internal:8500.

Any guidance on what client_base_url should be / anything else we should be doing?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dbustospcommented, Dec 10, 2020

@aidandunlop

If you check #2914. Here @chongkong clarify why you are getting this message. I agree with you that the message can lead to misinterpretation.

0reactions
google-ml-butler[bot]commented, Dec 10, 2020

Are you satisfied with the resolution of your issue? Yes No

Read more comments on GitHub >

github_iconTop Results From Across the Web

The InfraValidator TFX Pipeline Component - TensorFlow
Technically, a model can be infra validated in a local Docker environment and then served in a completely different environment (e.g. Kubernetes ...
Read more >
I can't install TensorFlow-macos a… | Apple Developer Forums
And so, I updated my OS to Monterey Beta and tried to install TensorFlow-Metal a few days ago. However, all installing instruction commands...
Read more >
Sentiment Analysis with TFX Pipelines — Local Deploy
3.1 Components. In our case, we chose not to use the InfraValidator component. However, we chose to add one more node to our...
Read more >
Bootstrap a Node - Chef Software
We recommended using “validatorless bootstrapping” to authenticate new nodes with the Chef Infra Server. The legacy Chef Infra validator-based ...
Read more >
TensorFlow Extended (TFX): the components and ... - Adaltas
Putting Machine Learning (ML) and Deep Learning (DL) models in production ... To help organizations implement an industrial-grade end-to-end ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found