Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Value Error (not enough values to unpack) in pool.py #44

Open
ANarayan opened this issue Jan 13, 2021 · 4 comments
Open

Value Error (not enough values to unpack) in pool.py #44

ANarayan opened this issue Jan 13, 2021 · 4 comments

Comments

@ANarayan
Copy link

ip, _, _ = backend.get_listen_addr()

I am getting the following error: ValueError: not enough values to unpack (expected 3, got 2) on line 908 in pool.py.

The error is being raised when I am calling fiber using docker as the backend.

This the command I am using to call the script: FIBER_BACKEND=docker FIBER_IMAGE=docker-test:latest python test_fiber_docker.py

@calio
Copy link
Collaborator

calio commented Jan 13, 2021

Can you provide a minimized test case (don't need to provide all of test_fiber_docker.py, just enough to reproduce this error)? Also, what OS are you running and what python version are you using?

@ANarayan
Copy link
Author

ANarayan commented Jan 13, 2021

Here is a minimized test case for reproducing the error:

import ludwig
import yaml
from ludwig.hyperopt.run import hyperopt

filename="config_docker.yaml"
file_path="goemotions.csv"

with open(filename) as f:
    file_contents = yaml.load(f, Loader=yaml.SafeLoader)

model_config = file_contents
hyperopt_results = hyperopt(
                model_config,
                dataset=file_path,
                model_name="goemotions_bert",
                output_directory="."
            )

Here is the contents of config_docker.yaml:

input_features:
- encoder: bert
  level: word
  name: text
  type: text
output_features:
- name: emotion_ids
  type: set
hyperopt:
  sampler:
    type: random
    num_samples: 50
  executor:
    type: fiber
    num_workers: 10
    fiber_backend: docker
    num_cpus_per_worker: 2

My OS is: Darwin 18.7.0 Darwin Kernel Version 18.7.0
Python version: Python 3.7.7

Let me know if you need any more info!

@Basasuya
Copy link

I think the problem is at docker_backend.py:195

        if sys.platform == "darwin":
            # use the same hostname for both master and non master process
            # because docker.for.mac.localhost resolves to different inside
            # and outside docker container. "docker.for.mac.localhost" is
            # the name that doesn't change in and outside the container.
            return "docker.for.mac.localhost", 0

it returns two elements.

But after I modify it, I still can not run through all the test on the MAC OS.

calio added a commit that referenced this issue Mar 15, 2021
@calio
Copy link
Collaborator

calio commented Mar 15, 2021

Hi @Basasuya , Fiber current doesn't work on Mac OS with Docker, see doc. But yeah, the return value is a bug that needs to be fixed.

calio added a commit that referenced this issue Mar 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants