Skip to content

Problems loading jsonnet files #9

@hclent

Description

@hclent

Hey there!

I am trying to run the DuoRat code from the Docker container, and experience issues with loading the jsonnet files

root@duorat:/app# python scripts/train.py --config configs/duorat/duorat-finetune-bert-large.jsonnet --logdir logdir/duorat-bert
Traceback (most recent call last):
  File "scripts/train.py", line 519, in <module>
    main()
  File "scripts/train.py", line 486, in main
    config = json.loads(_jsonnet.evaluate_file(args.config))
RuntimeError: RUNTIME ERROR: couldn't open import "../../data/train.libsonnet": no match locally or in the Jsonnet library paths.
	configs/duorat/duorat-base.libsonnet:5:17-52	object <anonymous>
	configs/duorat/duorat-base.libsonnet:(4:11)-(7:6)	object <anonymous>
	During manifestation	

And if I sanity check and look in the configs, I am able to find these files

root@duorat:/app# ls configs/duorat/
duorat-12G.jsonnet     duorat-bert.jsonnet  duorat-finetune-bert-base.jsonnet                  duorat-finetune-bert-large.jsonnet   duorat-good-no-bert.jsonnet             duorat-new-db-content.jsonnet
duorat-base.libsonnet  duorat-dev.jsonnet   duorat-finetune-bert-large-attention-maps.jsonnet  duorat-good-no-bert-no-from.jsonnet  duorat-new-db-content-no-whole.jsonnet

I have of course already googled around to see what the source of this error could be, but I can't seem to find anything helpful enough. Would you advise maybe that I try to hardcode this, or do you have any intuition as to why I might be getting this error?

-- Edit with more details

I suspect the problem may have to do with this command, where /logdir and /data are remounted onto home.

nvidia-docker run -it -u $(id -u ${USER}) --name my_duorat --rm -v $PWD/logdir:/logdir -v $PWD/data/:/app/data duorat

Because I am not running the docker container locally, I did not use this command. Rather, I created an image with google cloud platform, and then I spin up the image as an interactive bash session to work with.
I tried making symlinks and also using mount where the docker command re-mounts them, but that hasn't fixed the problem. For example:

root@duorat:/app# mount $PWD/data/ /app/data
mount: /app/data/: mount point does not exist.

Thanks so much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions