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

Experiment runing problem #49

Closed
DaDaPi3 opened this issue Jun 21, 2017 · 2 comments
Closed

Experiment runing problem #49

DaDaPi3 opened this issue Jun 21, 2017 · 2 comments
Assignees

Comments

@DaDaPi3
Copy link

DaDaPi3 commented Jun 21, 2017

I am trying test the code with a json file from 4_20_17. The variable "epoch" is defined within the "train_stages" in this json. But the rastervision/common/options.py uses the epoch variable without retrieving the train_stages. So when I run with "python -m rastervision.run experiments/....", it gives the following error:

root@0a7cd1dcc9ef:/opt/src# python -m rastervision.run experiments/semseg/4_20_17/fcn_0.json
Using TensorFlow backend.
Traceback (most recent call last):
  File "/opt/conda/lib/python3.5/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/conda/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/src/rastervision/run.py", line 47, in <module>
    run_tasks()
  File "/opt/src/rastervision/run.py", line 34, in run_tasks
    options = make_options(options_dict)
  File "/opt/src/rastervision/options.py", line 15, in make_options
    options = SemsegOptions(options_dict)
  File "/opt/src/rastervision/semseg/options.py", line 16, in __init__
    super().__init__(options)
  File "/opt/src/rastervision/common/options.py", line 18, in __init__
    self.epochs = options['epochs']
KeyError: 'epochs'

Can somebody please help to look at it?

@lewfish lewfish self-assigned this Jun 21, 2017
@lewfish
Copy link
Contributor

lewfish commented Jun 21, 2017

I just merged #51 that fixes the issue you reported and some other things. I was able to get python -m rastervision.run experiments/semseg/4_20_17/fcn_0.json to run without errors using the following updated experiment file. Remember that experiment files aren't backward compatible, so to get it to run with the develop branch, I made some necessary changes which were

    "problem_type": "semseg",
    "dataset_name": "isprs/potsdam",

I also made various changes so it would run quickly for testing purposes.

{
    "batch_size": 1,
    "problem_type": "semseg",
    "dataset_name": "isprs/potsdam",
    "generator_name": "numpy",
    "active_input_inds": [3, 0, 1],
    "use_pretraining": false,
    "freeze_base": false,
    "train_stages": [
        {
            "epochs": 1,
            "init_lr": 1e-5
        },
        {
            "epochs": 2,
            "init_lr": 1e-6
        }
    ],
    "kernel_size": [5, 5],
    "train_ratio": 0.8,
    "optimizer": "adam",
    "target_size": [256, 256],
    "eval_target_size": [2000, 2000],
    "nb_eval_samples": 1,
    "nb_eval_plot_samples": 1,
    "model_type": "conv_logistic",
    "run_name": "semseg/4_20_17/fcn_0",
    "validation_steps": 1,
    "steps_per_epoch": 1
}

@lewfish
Copy link
Contributor

lewfish commented Jun 21, 2017

Thanks for the bug report and sorry for any inconvenience. When we get the time, we'd like to come up with a better testing strategy.

@lewfish lewfish closed this as completed Jun 21, 2017
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