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.

Ray Import Failed

See original GitHub issue

Describe the bug I tried to re-use a model that I have used multiple times however, today I get the error that ray cant be imported. I tried re-running my experiment and I get the same error. Exact error codes are, Experiment:

!ludwig experiment \
 --dataset CompanyAndIndust.csv\
 --config_file model_definition.yaml

NumExpr defaulting to 2 threads.
import ray failed with exception: No module named 'ray'
usage: ludwig experiment [options]
ludwig experiment: error: one of the arguments -c/--config -cs/--config_str is required

Predict:

from ludwig.api import LudwigModel
model = LudwigModel.load("/path/")
predictions, _ = model.predict(dft.rename(columns={'company_name': 'name'} ))

Import ray failed with exception: No module named 'ray'
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py:299: UserWarning: Using padding='same' with even kernel lengths and odd dilation may require a zero-padded copy of the input be created (Triggered internally at  ../aten/src/ATen/native/Convolution.cpp:744.)
  self.padding, self.dilation, self.groups)

To Reproduce Steps to reproduce the behavior:

1 installed the tools + libraries !pip install tensorflow-gpu !pip install ray !pip install ludwig

import pandas as pd from datetime import datetime as dt import numpy as np from google.colab import drive from google.colab import files drive.mount(‘drive’)

2 I run predict and I get the error

Environment (please complete the following information):

  • OS: Mac running Python on Google Colab
  • Version 12.2,
  • Python version 3.7.13
  • Ludwig version 0.5

Thank in advance guys

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14

github_iconTop GitHub Comments

2reactions
tgaddaircommented, May 17, 2022

Hey @MarijnQ, is it possible to upgrade to Python 3.7 or newer? We are officially dropping support for Python 3.6 in Ludwig 0.5, so it may be that some dependency packages are not supported in 3.6.

1reaction
tgaddaircommented, May 26, 2022

Hey @MarijnQ, it looks like your notebook is GPU-capable. Another thing you can check is GPU visibility with nvidia-smi.

Apologies, I sent you the wrong torch command earlier. Can you actually run torch.cuda.is_available() and share the output?

Read more comments on GitHub >

github_iconTop Results From Across the Web

import error · Issue #8482 · ray-project/ray - GitHub
I have created a PR in the upstream (pickle5-backport), it would address the problem once merged. All reactions.
Read more >
Import issue for ray in Python - Stack Overflow
When trying to import ray (code: import ray ) into a Python script in macOSX Monterey and pycharm I get the following error:....
Read more >
X-Ray Import failed with Status:400 Response:{"error":"
I am trying to import a cucumber json report file using Xray import from Jenkins. Its throwing the following error - 22:54:56 Starting...
Read more >
[Xray Server] Error when importing test cases with Xray Test ...
Problem. When doing and import with Xray Test Case Importer and after the mapping, an external error - Error 500 appears. One possible...
Read more >
RuntimeError: Failed to unpickle serialized exception - Ray Core
Hello, I am using ray library for parallelization. my code is as below. import time import ray from elasticsearch import Elasticsearch ...
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