Skip to content

[semester-upkeep] Provide greater detail on nbgrader errors #29

@jmuchovej

Description

@jmuchovej

nbgrader allows us to generate "non-solution" notebooks from "solution" notebooks. More concretely, a Coordinator may write a function like the following:

def train_loop(data: Batches, n_epochs: int = 500):
    # ... some magical preprocessing happens
    for epoch in range(n_epochs):
        # implement the training loop
        ### BEGIN SOLUTION
        for batch in data:
            input, labels = [x.to(device) for x in batch]
            optim.zero_grad()

            output = model(input)
            # some more code
        ### END SOLUTION

and nbgrader will process this cell to produce the following output:

def train_loop(data: Batches, n_epochs: int = 500):
    # ... some magical preprocessing happens
    for epoch in range(n_epochs):
        # implement the training loop
        ### YOUR CODE HERE
        raise NotImplementedError()

Tasks

  • (🔑 Required) Retrieve nbgrader's error and dump that to the screen.
  • (🍜 Nice to Have) Attempt to correct the error
    • This could actually get gnarly pretty quickly, so this should be saved until the very end.

Metadata

Metadata

Labels

🎆 feature-request🔑 requiredTasks that **need** to be completed, ASAP.📝 todoItems in still in ideation, discovery, or planning "mode."🍜 nice to haveTasks that should be completed, but not necessarily ASAP.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions