Repository: mlcommons/inference
Issue: Proposing the change of `closed/participant_name/code/` to `closed/participant_name/src`
Root cause: Architectural Constraint

The current rules dictate that the submission must follow the naming: 
`closed/participant_name/code`. 

Python is the language of choice to implement src codes, and the `code/` dir may be a python package. However, the name conflicts with the standard python library `code`: https://docs.python.org/3.12/library/code.html

Consider the flow of `import torch` from working directory `closed/participant_name`: 
```
python3 -c "import torch"
|-> import pdb
|---> import code
``` 

Here, Python would attempt to import artefacts from `closed/participant_name/code` instead of from the PYTHONPATH (`/usr/lib/python3.12/code.py`) - which may lead to ambiguous errors and undefined behavior. 

A sample error trace below demonstrates this issue:


```
(/work) $ python3 -c "import torch"  
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.12/dist-packages/torch/__init__.py", line 2135, in <module>
    from torch import _VF as _VF, functional as functional  # usort: skip
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torch/functional.py", line 8, in <module>
    import torch.nn.functional as F
  File "/usr/local/lib/python3.12/dist-packages/torch/nn/__init__.py", line 8, in <module>
    from torch.nn.modules import *  # usort: skip # noqa: F403
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/__init__.py", line 1, in <module>
    from .module import Module  # usort: skip
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py", line 17, in <module>
    from torch.utils._python_dispatch import is_traceable_wrapper_subclass
  File "/usr/local/lib/python3.12/dist-packages/torch/utils/__init__.py", line 8, in <module>
    from torch.utils import (
  File "/usr/local/lib/python3.12/dist-packages/torch/utils/data/__init__.py", line 1, in <module>
    from torch.utils.data.dataloader import (
  File "/usr/local/lib/python3.12/dist-packages/torch/utils/data/dataloader.py", line 22, in <module>
    import torch.distributed as dist
  File "/usr/local/lib/python3.12/dist-packages/torch/distributed/__init__.py", line 3, in <module>
    import pdb
  File "/usr/lib/python3.12/pdb.py", line 77, in <module>
    import code
  File "/work/code/__init__.py", line 19, in <module>
    from code.common.constants import Benchmark
  File "/work/code/common/__init__.py", line 24, in <module>
    from nvmitten.utils import run_command
ModuleNotFoundError: No module named 'nvmitten'
```

As can be seen, importing torch triggers an `import code` which erroneously imports `$current_working_dir/code`

@pgmpablo157321 @hanyunfan ^^
We need to consider refactoring the folder hierarchy from "code" to "src"

Should we also add a `docs` folder then to keep the READMEs?

This is being looked at in the inference WG

I would also like to propose closed/open directory to go inside the submitter folder. In that case src/code folder which is usually the same for open/closed division don't need to be duplicated. 

@pgmpablo157321 @tanvi-mlcommons just to bump up this because it's causing more trouble in our code pipelines - shall we discuss it in the WGM next week? (can wen make it a 5.1-postmortem item as well?)
cc: @nv-alicheng 

I will reserve some time for this topic in next WG meeting. 

> [@pgmpablo157321](https://github.com/pgmpablo157321) [@tanvi-mlcommons](https://github.com/tanvi-mlcommons) just to bump up this because it's causing more trouble in our code pipelines - shall we discuss it in the WGM next week? (can wen make it a 5.1-postmortem item as well?) cc: [@nv-alicheng](https://github.com/nv-alicheng)

Absolutely! Let's discuss this in next week's WGM

This was discussed in the working group today, and it's okay to change the directory name from code to src.

https://github.com/mlcommons/inference/pull/2366 got merged.

Thanks a lot! 😄