tensorflow / tensorflow/fairness-indicators

Vulcanized Template Route test failure

Open
#388 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
358
Forks
88
PR merge metrics
No merged PRs in 30d

Description

System information

  • Have I written custom code (as opposed to using stock example code provided): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 24.04
  • Fairness Indicators version: 0.47.0
  • TensorFlow version: 2.16.2
  • Python version: 3.9, 3.10

Describe the current behavior

The testVulcanizedTemplateRoute test fails because the vulcanized_tfma.js is not found:

self = <tensorboard_plugin_fairness_indicators.plugin.FairnessIndicatorsPlugin object at 0x7b58a01f0a00>, request = <Request 'http://localhost/data/plugin/fairness_indicators/vulcanized_tfma.js' [GET]>

    @wrappers.Request.application
    def _serve_vulcanized_js(self, request):
>     with open(_TEMPLATE_LOCATION) as infile:
E     FileNotFoundError: [Errno 2] No such file or directory: '/home/redacted/path/tensorboard_plugin/tensorflow_model_analysis/static/vulcanized_tfma.js'

Describe the expected behavior

The test should run and pass.

Standalone code to reproduce the issue

Once #387 is merged, the test failure can be reproduced with

$ cd path/to/project/tensorboard_plugin
$ pytest --runxfail tensorboard_plugin_fairness_indicators/plugin_test.py

Other info / logs

self = <tensorboard_plugin_fairness_indicators.plugin_test.PluginTest testMethod=testVulcanizedTemplateRoute>

    @pytest.mark.xfail(
      reason=(
        "Failing on `master` as of `942b672457e07ac2ac27de0bcc45a4c80276785c`. "
        "Please remove once fixed."
        )
    )
    def testVulcanizedTemplateRoute(self):
      """Tests that the /tags route offers the correct run to tag mapping."""
>     response = self._server.get(
          "/data/plugin/fairness_indicators/vulcanized_tfma.js"
      )

tensorboard_plugin_fairness_indicators/plugin_test.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.pixi/envs/py39/lib/python3.9/site-packages/werkzeug/test.py:1006: in get
    return self.open(*args, **kw)
.pixi/envs/py39/lib/python3.9/site-packages/werkzeug/test.py:970: in open
    response = self.run_wsgi_app(environ.copy(), buffered=buffered)
.pixi/envs/py39/lib/python3.9/site-packages/werkzeug/test.py:861: in run_wsgi_app
    rv = run_wsgi_app(self.application, environ, buffered=buffered)
.pixi/envs/py39/lib/python3.9/site-packages/werkzeug/test.py:1096: in run_wsgi_app
    app_rv = app(environ, start_response)
.pixi/envs/py39/lib/python3.9/site-packages/tensorboard/backend/application.py:528: in __call__
    return self._app(environ, start_response)
.pixi/envs/py39/lib/python3.9/site-packages/tensorboard/backend/application.py:569: in wrapper
    return wsgi_app(environ, start_response)
.pixi/envs/py39/lib/python3.9/site-packages/tensorboard/backend/security_validator.py:91: in __call__
    return self._application(environ, start_response_proxy)
.pixi/envs/py39/lib/python3.9/site-packages/tensorboard/backend/path_prefix.py:68: in __call__
    return self._application(environ, start_response)
.pixi/envs/py39/lib/python3.9/site-packages/tensorboard/backend/experiment_id.py:73: in __call__
    return self._application(environ, start_response)
.pixi/envs/py39/lib/python3.9/site-packages/tensorboard/backend/empty_path_redirect.py:43: in __call__
    return self._application(environ, start_response)
.pixi/envs/py39/lib/python3.9/site-packages/tensorboard/backend/client_feature_flags.py:55: in __call__
    return self._application(environ, start_response)
.pixi/envs/py39/lib/python3.9/site-packages/tensorboard/backend/auth_context_middleware.py:38: in __call__
    return self._application(environ, start_response)
.pixi/envs/py39/lib/python3.9/site-packages/tensorboard/backend/application.py:551: in _route_request
    return self.exact_routes[clean_path](environ, start_response)
.pixi/envs/py39/lib/python3.9/site-packages/werkzeug/wrappers/base_request.py:238: in application
    resp = f(*args[:-2] + (request,))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tensorboard_plugin_fairness_indicators.plugin.FairnessIndicatorsPlugin object at 0x7b58a01f0a00>, request = <Request 'http://localhost/data/plugin/fairness_indicators/vulcanized_tfma.js' [GET]>

    @wrappers.Request.application
    def _serve_vulcanized_js(self, request):
>     with open(_TEMPLATE_LOCATION) as infile:
E     FileNotFoundError: [Errno 2] No such file or directory: '/home/redacted/path/tensorboard_plugin/tensorflow_model_analysis/static/vulcanized_tfma.js'

tensorboard_plugin_fairness_indicators/plugin.py:263: FileNotFoundError

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tensorboard_plugin_fairness_indicators/plugin_test.py:testVulcanizedTemplateRoute and run the provided pytest --runxfail command. Then inspect tensorboard_plugin_fairness_indicators/plugin.py:_serve_vulcanized_js and the referenced tensorflow_model_analysis/static/vulcanized_tfma.js location. Done means the route serves the file, the test passes, and its xfail marker can be removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python, tensorflow
Domain
backend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.