Skip to content

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

Description

@joihn

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions