Giter Club home page Giter Club logo

Comments (4)

danielkorat avatar danielkorat commented on August 15, 2024

Hi,

Thanks for noticing this issue, we are already working on a small patch which fixes it. The probable reason is system-dependant encoding formats. Meanwhile, please try adding the argument encoding='utf-8' to the open() command at models/absa/utils.py line 201. This should solve it. You can do the same in other relevant open() calls if this issue comes up.
BTW, which OS are you using?

Thanks

from nlp-architect.

hsm207 avatar hsm207 commented on August 15, 2024

Hi @danielkorat,

Thanks for the tip.

I couldn't figure out what to change to fix this error:

image

Any advice?

I'm actually running nlp architect inside a docker container. Its's based off the tensorflow 1.12 container so it should be ubuntu 16.04. Here's the dockerfile:

FROM tensorflow/tensorflow:1.12.0-gpu-py3

# installation instructions from http://nlp_architect.nervanasys.com/installation.html

RUN apt-get update && apt-get install -y \
    git \
    libhdf5-dev \
    pkg-config \
    wget

WORKDIR /tmp

# use Anaconda instead of virtualenv to manage virtual environments
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \
    bash miniconda.sh -b -p /opt/conda && \
    rm miniconda.sh && \
    /opt/conda/bin/conda clean -tipsy && \
    ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
    echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
    echo "conda activate base" >> ~/.bashrc

RUN /opt/conda/bin/conda create -y -n nlp-architect setuptools wheel python=3.6

WORKDIR /opt

RUN export NLP_ARCHITECT_BE=GPU && \
    git clone https://github.com/NervanaSystems/nlp-architect.git && \
    cd nlp-architect && \
    # since it is not recommended to have build time GPU support, we will modify requirements.txt to explicitly install
    # tensorflow-gpu.
    # see: https://github.com/NVIDIA/nvidia-docker/wiki/Frequently-Asked-Questions#can-i-use-the-gpu-during-a-container-build-ie-docker-build
    sed -i 's/tensorflow==/tensorflow-gpu==/' requirements.txt && \
    /opt/conda/envs/nlp-architect/bin/pip install -e .

from nlp-architect.

danielkorat avatar danielkorat commented on August 15, 2024

Hi @hsm207,

Please try running this shell command to set default encoding to utf-8: export PYTHONIOENCODING=utf8. This should solve all encoding errors altogether.
If not, see this thread for additional solutions:
https://stackoverflow.com/questions/47968578/python3-utf-8-decode-issue

from nlp-architect.

hsm207 avatar hsm207 commented on August 15, 2024

Hi @danielkorat

Thanks for the hint.

I finally found the solution here:
https://stackoverflow.com/questions/27931668/encoding-problems-when-running-an-app-in-docker-python-java-ruby-with-u

from nlp-architect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.