Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

train config yaml system does not correctly load local variable #3

Open
joihn opened this issue Apr 10, 2024 · 2 comments
Open

train config yaml system does not correctly load local variable #3

joihn opened this issue Apr 10, 2024 · 2 comments

Comments

@joihn
Copy link

joihn commented Apr 10, 2024

hanks for this repo,
I'm launching a training with python 3.10, via pycharm IDE.
when executing:
python train.py --config_file=./config/image_gen_train.yaml

the nominal user would expect image_gen_train.yaml params to be loaded.
However they are NOT.

locals().update(config[key])

this syntax seems uneffective to change local variable. Thus local variable stay unchanged by the config.

relevant stackoverflow :
https://stackoverflow.com/questions/30295163/update-locals-from-inside-a-function

env:
ubuntu 20 with the below presented docker container
python 3.10.11
dockerfile for my developer environment:

# Dockerfile inspired by https://github.com/open-mmlab/mmsegmentation/blob/1.x/docker/Dockerfile

ARG PYTORCH="2.0.1"
ARG CUDA="11.7"
ARG CUDNN="8"

ARG PYTHON_VERSION="3.10"

FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel as diffusion
ARG DEBIAN_FRONTEND=noninteractive

ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6 8.9+PTX"
ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"

RUN apt-get update && apt-get install -y git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1 wget vim nano \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
RUN pip install scikit-learn opencv-python pandas
@joihn
Copy link
Author

joihn commented Apr 10, 2024

I can confirm that launching a training via CLI (not via pycharm ) results in the same behavior

@joihn joihn changed the title train config system does not work train config yaml system does not correctly load local variable Apr 15, 2024
@marcoaversa
Copy link
Owner

thanks for your feedback, the code will be fixed as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants