harbor run -t openthoughts/tasktrove-exp-rpt-curriculum-medium-curriculum-medium-0371harbor download openthoughts/tasktrove-exp-rpt-curriculum-medium-curriculum-medium-0371Task: Implement the CondorOrdinalCrossEntropy loss inside a Python package placed at /app/condor_pytorch/.
What to build
Create a Python package named condor_pytorch (i.e., a directory /app/condor_pytorch/ with init.py) containing a module losses.py.
In losses.py, implement a function with the following signature and behavior:
Signature: def CondorOrdinalCrossEntropy(logits: torch.Tensor, levels: torch.Tensor, reduction: str = 'mean') -> torch.Tensor
Behavior:
What the code should look like (high-level guidance)
File layout:
In losses.py, provide:
Notes and constraints
Implementation considerations and edge cases (moderate)
Hints (without full solution)
How this will be tested
Implementation location