bytedance / monolith

ByteDance's Recommendation System
Other
865 stars 124 forks source link

Demo is currently broken #5

Closed cmgreen210 closed 1 year ago

cmgreen210 commented 1 year ago

I ran bazel run //markdown/demo:demo_local_runner -- --training_type=batch and output suggests that there's some code missing: AttributeError: module 'monolith.native_training.env_utils' has no attribute 'generate_psm_from_uuid'

Traceback (most recent call last):
  File "/home/green/.cache/bazel/_bazel_green/bf4782e691ac8318220629c47f43c1eb/execroot/__main__/bazel-out/k8-opt/bin/markdown/demo/demo_local_runner.runfiles/__main__/markdown/demo/demo_model.py", line 128, in <module>
    app.run(main)
  File "/home/green/.cache/bazel/_bazel_green/bf4782e691ac8318220629c47f43c1eb/execroot/__main__/bazel-out/k8-opt/bin/markdown/demo/demo_local_runner.runfiles/absl_py/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/home/green/.cache/bazel/_bazel_green/bf4782e691ac8318220629c47f43c1eb/execroot/__main__/bazel-out/k8-opt/bin/markdown/demo/demo_local_runner.runfiles/absl_py/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "/home/green/.cache/bazel/_bazel_green/bf4782e691ac8318220629c47f43c1eb/execroot/__main__/bazel-out/k8-opt/bin/markdown/demo/demo_local_runner.runfiles/__main__/markdown/demo/demo_model.py", line 124, in main
    estimator.train(max_steps=1000000)
  File "/home/green/.cache/bazel/_bazel_green/bf4782e691ac8318220629c47f43c1eb/execroot/__main__/bazel-out/k8-opt/bin/markdown/demo/demo_local_runner.runfiles/__main__/monolith/native_training/estimator.py", line 417, in train
    with monolith_discovery(self._runner_conf) as discovery:
  File "/usr/local/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/home/green/.cache/bazel/_bazel_green/bf4782e691ac8318220629c47f43c1eb/execroot/__main__/bazel-out/k8-opt/bin/markdown/demo/demo_local_runner.runfiles/__main__/monolith/native_training/runner_utils.py", line 371, in monolith_discovery
    raise e
  File "/home/green/.cache/bazel/_bazel_green/bf4782e691ac8318220629c47f43c1eb/execroot/__main__/bazel-out/k8-opt/bin/markdown/demo/demo_local_runner.runfiles/__main__/monolith/native_training/runner_utils.py", line 365, in monolith_discovery
    psm = env_utils.generate_psm_from_uuid(runner_conf.uuid)
AttributeError: module 'monolith.native_training.env_utils' has no attribute 'generate_psm_from_uuid'
hanzhi713 commented 1 year ago

I'll look into it.

Monolith is still in the early stage of open source development, please forgive any instability while we cleanup our code for open source.

hanzhi713 commented 1 year ago

As a temporary solution, you can add this function to monolith/native_training/env_utils.py

def generate_psm_from_uuid(s):
  return s
hanzhi713 commented 1 year ago

Should be fixed by 39e5001ee841ce170cbda900aae479c0b8a7157d