Submission issues

Hello guys

Could you please explain how you run your notebooks submission.

  1. should everything be for training in the same cell and also everything should be in the inference cell? Cause I have defined some global variable and it’s not available for the elements in the same cell.
  2. functions defined inside functions gives an error that error is already present
    like
    def foo():
    def bar():
    print(“hi there”)
    return 0
    bar()
    return 1
    I have waisted 7 submissions figuring out these issues. I would like my submission balance increased by the same amount.

I already answered you on Discord, but here is a copy:

Everything which is not imports, functions and classes will be commented because notebooks users often leave a lot of debug code that would crash in the runner environment.

I will think about adding a comment to keep regular code in the global scope.
Something like (subject to change):

# crunchdao:keep
life = 42

but_do_not_keep = "me"

In the meantime, you can declare your stuff in the function or use a class as storage:

class Globals:

    life = 42

def infer():
    print(Globals.life)

Keep in mind that your code must be stateless as the infer function could be run without the train function.