Giter VIP home page Giter VIP logo

cis2021-hackathon's People

Contributors

langmm avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cis2021-hackathon's Issues

invalid syntax error with the co2.py model when attempting TYK#2 part 1

file: yamls/test2.yml

model:
     name: co2
     language: python
     args: ../models/co2.py
     function: calculate_concentration

file: yamls/connections_test2.yml

connections:
  - input:
      name: ../input/height.txt
      filetype: table
    output: co2:input
  - input: co2:output
    output:
      name: ../output/co2.txt
      filetype: table
      field_names: [conc]
INFO:616:runner.startDrivers[497]:YggRunner(runner): Starting I/O drivers and models on system jupyter-cropsinsilico-2dcis2021-2dhackathon-2d1tlflgdz in namespace yggdrasil with rank 0
/srv/conda/envs/notebook/bin/python /home/jovyan/models/ygg_co2.py
  File "/home/jovyan/models/ygg_co2.py", line 19
    [doy, dist, height, offset=60.0] = temp_doy
                              ^
SyntaxError: invalid syntax
ERROR:616:ModelDriver.kill_process[1451]:PythonModelDriver(co2): return code of 1 indicates model error. (sent messages: {'co2:output': 0})
ERROR:616:ConnectionDriver.run_loop[1026]:ConnectionDriver(co2:input): Could not send message.
ERROR:616:runner.waitModels[542]:YggRunner(runner): Error in model co2
ERROR:616:runner.waitModels[575]:YggRunner(runner): One or more models generated errors.
ConnectionDriver(co2:input):                      last action: after loop       is_open(False, False),   7 received,    7 processed,   6 sent,        10 ready to recv    0 ready to send     close state: output model exit
ConnectionDriver(co2:output):                     last action: after loop       is_open(False, False),   0 received,    0 processed,   0 sent,        0 ready to recv     0 ready to send     close state: input model exit 
INFO:616:multitasking.printStatus[850]:PythonModelDriver(co2): yggdrasil.drivers.PythonModelDriver(co2): state: finished
INFO:616:runner.run[374]:YggRunner(runner):                 init	0.000010
INFO:616:runner.run[374]:YggRunner(runner):         load drivers	0.011041
INFO:616:runner.run[374]:YggRunner(runner):        start drivers	0.080985
INFO:616:runner.run[374]:YggRunner(runner):           run models	0.206427
INFO:616:runner.run[374]:YggRunner(runner):              at exit	0.001975
INFO:616:runner.run[376]:YggRunner(runner): ========================================
INFO:616:runner.run[377]:YggRunner(runner):                Total	0.300437

file: output/co2.txt
====================

"Binder not found"

Context (Environment)

  • MyBinder instance
  • Local install
  • Docker container

OS: Mac

Browser: Google Chrome

Type of Issue

  • Jupyter notebook failed to open
  • One or more of the cells failed
  • Question
  • Other (please describe below)

[OPTIONAL] Expected Behavior

When clicking on a notebook from the browser the notebook should open in a new tab.

[OPTIONAL] Current Behavior

The notebook does not open and this message is displayed in a new tab.
image

[OPTIONAL] Steps to Reproduce

  1. Open a MyBinder instance
  2. Wait
  3. Click on a notebook

Description

The 00-intro.ipynb notebook failed to open from the MyBinder browser page when I clicked on the file name.

Oops!
We can't seem to find the Binder page you are looking for.
404 error

Error for test 1: Both the input and output for this connection appear to be files

My yaml files are

yamls/test1.yaml

model:
     name: light
     language: python
     args: ../models/weather.py
     function: temp

yamls/connections_test1.yaml

connections:
  - input:
      name: ../input/intensity.txt
      filetype: table
    output: light:input
  - input: temp:output
    output:
      name: ../output/temp.txt
      filetype: table
      field_names: [T]

Error message

 ---------------------------------------------------------------------------
ValidationError                           Traceback (most recent call last)
<ipython-input-15-5f295a9434fd> in <module>
      1 tools.display_source('models/weather.py', number_lines=True)
      2 tools.display_source('yamls/test1.yaml', number_lines=True)
----> 3 run(['yamls/test1.yaml', 'yamls/connections_test1.yaml'], production_run=True)
      4 tools.display_source('output/temp.txt', number_lines=True)

/srv/conda/envs/notebook/lib/python3.9/site-packages/yggdrasil/runner.py in run(*args, **kwargs)
    721 
    722 def run(*args, **kwargs):
--> 723     yggRunner = get_runner(*args, **kwargs)
    724     try:
    725         yggRunner.run()

/srv/conda/envs/notebook/lib/python3.9/site-packages/yggdrasil/runner.py in get_runner(models, **kwargs)
    716     kwargs.update(rank=rank, host=host)
    717     # Run
--> 718     yggRunner = YggRunner(models, **kwargs)
    719     return yggRunner
    720 

/srv/conda/envs/notebook/lib/python3.9/site-packages/yggdrasil/runner.py in __init__(self, modelYmls, namespace, host, rank, ygg_debug_level, rmq_debug_level, ygg_debug_prefix, connection_task_method, as_function, production_run)
    268         cfg_environment()
    269         # Parse yamls
--> 270         self.drivers = yamlfile.parse_yaml(modelYmls, as_function=as_function)
    271         self.connectiondrivers = self.drivers['connection']
    272         self.modeldrivers = self.drivers['model']

/srv/conda/envs/notebook/lib/python3.9/site-packages/yggdrasil/yamlfile.py in parse_yaml(files, as_function)
    184     # print('prepped')
    185     # pprint.pprint(yml_prep)
--> 186     yml_norm = s.validate(yml_prep, normalize=True,
    187                           no_defaults=True, required_defaults=True)
    188     # print('normalized')

/srv/conda/envs/notebook/lib/python3.9/site-packages/yggdrasil/schema.py in validate(self, obj, **kwargs)
   1044             # kwargs.setdefault('no_defaults', True)
   1045             kwargs.setdefault('schema_registry', self)
-> 1046         return metaschema.validate_instance(obj, self.schema, **kwargs)
   1047 
   1048     def validate_component(self, comp_name, obj, **kwargs):

/srv/conda/envs/notebook/lib/python3.9/site-packages/yggdrasil/metaschema/__init__.py in validate_instance(obj, schema, **kwargs)
    177     cls = get_validator()
    178     cls.check_schema(schema)
--> 179     return cls(schema).validate(obj, **kwargs)
    180 
    181 

/srv/conda/envs/notebook/lib/python3.9/site-packages/yggdrasil/metaschema/normalizer.py in validate(self, instance, _schema, normalize, **kwargs)
    338             if normalize:
    339                 with self.normalizing(**kwargs):
--> 340                     super(Normalizer, self).validate(instance, _schema=_schema)
    341                 out = self._normalized
    342                 return out

/srv/conda/envs/notebook/lib/python3.9/site-packages/jsonschema/validators.py in validate(self, *args, **kwargs)
    351         def validate(self, *args, **kwargs):
    352             for error in self.iter_errors(*args, **kwargs):
--> 353                 raise error
    354 
    355         def is_type(self, instance, type):

ValidationError: Both the input and output for this connection appear to be files:
{'inputs': [{'filetype': 'binary',
             'name': 'temp:output',
             'serializer': {'seritype': 'direct'},
             'working_dir': '/home/jovyan/yamls'}],
 'outputs': [{'field_names': ['T'],
              'filetype': 'table',
              'name': '../output/temp.txt',
              'working_dir': '/home/jovyan/yamls'}]}

Failed validating <function _normalize_connio_last at 0x7f02a1ebd940> in schema['properties']['connections']['items']['allOf']:
    {'anyOf': [{'additionalProperties': True,
                'description': 'Schema for connection component '
                               "['connection'] subtype.",
                'properties': {'connection_type': {'description': 'Connection '
                                                                  'between '
                                                                  'one or '
                                                                  'more '
                                                                  'comms/files '
                                                                  'and one '
                                                                  'or more '
                                                                  'comms/files.',
                                                   'enum': ['connection'],
                                                   'type': 'string'}},
                'title': 'ConnectionDriver',
                'type': 'object'},
               {'additionalProperties': True,
                'description': 'Schema for connection component '
                               "['rpc_response'] subtype.",
                'properties': {'connection_type': {'description': 'Connection '
                                                                  'between '
                                                                  'one or '
                                                                  'more '
                                                                  'comms/files '
                                                                  'and one '
                                                                  'or more '
                                                                  'comms/files.',
                                                   'enum': ['rpc_response'],
                                                   'type': 'string'}},
                'title': 'RPCResponseDriver',
                'type': 'object'},
               {'additionalProperties': True,
                'description': 'Schema for connection component '
                               "['rpc_request'] subtype.",
                'properties': {'connection_type': {'description': 'Connection '
                                                                  'between '
                                                                  'one or '
                                                                  'more '
                                                                  'comms/files '
                                                                  'and one '
                                                                  'or more '
                                                                  'comms/files.',
                                                   'enum': ['rpc_request'],
                                                   'type': 'string'}},
                'title': 'RPCRequestDriver',
                'type': 'object'},
               {'additionalProperties': True,
                'description': "Schema for connection component ['output'] "
                               'subtype.',
                'properties': {'connection_type': {'description': 'Connection '
                                                                  'between '
                                                                  'a model '
                                                                  'and one '
                                                                  'or more '
                                                                  'comms/files.',
                                                   'enum': ['output'],
                                                   'type': 'string'}},
                'title': 'OutputDriver',
                'type': 'object'},
               {'additionalProperties': True,
                'description': 'Schema for connection component '
                               "['file_output'] subtype.",
                'properties': {'connection_type': {'description': 'Connection '
                                                                  'between '
                                                                  'a model '
                                                                  'and a '
                                                                  'file.',
                                                   'enum': ['file_output'],
                                                   'type': 'string'}},
                'title': 'FileOutputDriver',
                'type': 'object'},
               {'additionalProperties': True,
                'description': "Schema for connection component ['input'] "
                               'subtype.',
                'properties': {'connection_type': {'description': 'Connection '
                                                                  'between '
                                                                  'one or '
                                                                  'more '
                                                                  'comms/files '
                                                                  'and a '
                                                                  'model.',
                                                   'enum': ['input'],
                                                   'type': 'string'}},
                'title': 'InputDriver',
                'type': 'object'},
               {'additionalProperties': True,
                'description': 'Schema for connection component '
                               "['file_input'] subtype.",
                'properties': {'connection_type': {'description': 'Connection '
                                                                  'between '
                                                                  'a file '
                                                                  'and a '
                                                                  'model.',
                                                   'enum': ['file_input'],
                                                   'type': 'string'}},
                'title': 'FileInputDriver',
                'type': 'object'}]}

On instance['connections'][1]:
    {'inputs': [{'filetype': 'binary',
                 'name': 'temp:output',
                 'serializer': {'seritype': 'direct'},
                 'working_dir': '/home/jovyan/yamls'}],
     'outputs': [{'field_names': ['T'],
                  'filetype': 'table',
                  'name': '../output/temp.txt',
                  'working_dir': '/home/jovyan/yamls'}]}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.