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

generate_workers missing on icenet_train #235

Open
JimCircadian opened this issue Mar 23, 2024 · 1 comment · Fixed by #267
Open

generate_workers missing on icenet_train #235

JimCircadian opened this issue Mar 23, 2024 · 1 comment · Fixed by #267
Labels
bug Something isn't working
Milestone

Comments

@JimCircadian
Copy link
Member

  • IceNet version: 0.2.8_dev

Description

Running training, the parameter generate_workers for the dataset isn't necessarily going to be in place, so we should account for this.

What I Did

icenet_train -b 4 -e 5 -f 3 -n 1.44 -s mirrored --gpus 6 -nw --lr 25e-5 \
  exp23_south test_south1 42 \
  2>&1 | tee logs/test_south1.log

Traceback (most recent call last):
  File "/home/dn-byrn1/.conda/envs/icenet/bin/icenet_train", line 33, in <module>
    sys.exit(load_entry_point('icenet', 'console_scripts', 'icenet_train')())
  File "/rds/user/dn-byrn1/hpc-work/icenet/icenet/icenet/model/train.py", line 370, in main
    dataset = IceNetDataSet("dataset_config.{}.json".format(args.dataset),
  File "/rds/user/dn-byrn1/hpc-work/icenet/icenet/icenet/data/dataset.py", line 79, in __init__
    self._generate_workers = self._config["generate_workers"]
KeyError: 'generate_workers'

Checking the dataset config, this value isn't available. As this is a tf.data precached dataset, the invocation of the dataset for training is not passed generation parameters, so a clause allowing this to be missing is needed:

    if len(args.additional) == 0:
        dataset = IceNetDataSet("dataset_config.{}.json".format(args.dataset),
                                batch_size=args.batch_size,
                                shuffling=args.shuffle_train)
@JimCircadian JimCircadian added the bug Something isn't working label Mar 23, 2024
@JimCircadian JimCircadian added this to the v0.2.8 milestone Mar 23, 2024
@JimCircadian
Copy link
Member Author

JimCircadian commented Mar 23, 2024

Sticking a value in for generate_workers into dataset_config...json sorted this out. The configuration in use is doubtless quite old (probably 0.2.6 or 7) but we should be defending against missing parameters. Also, this parameter shouldn't be applicable in this situation anyway.

@bnubald bnubald modified the milestones: v0.2.8, v0.2.9, v0.3.0 Apr 10, 2024
bnubald added a commit to bnubald/icenet that referenced this issue May 29, 2024
@bnubald bnubald linked a pull request May 29, 2024 that will close this issue
bnubald added a commit that referenced this issue May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants