TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #201 · 13 јан.

Мы уже знаем, что на текущую сессию интерпретатора изменение PYTHONPATH никак не повлияет. Но если вы запустите дочерний процесс, то он унаследует окружение текущего процесса, а значит и изменения в любых переменных будут на него влиять. Вот небольшой пример: Объявляем переменную user@host:~$ export PYTHONPATH=/path1 Запускаем интерпретатор user@host:~$ python3 Проверим что в sys.path >>> import sys >>> print(sys.path) ['', '/path1', '/usr/lib/...', ...] Добавляем что-то в переменную >>> import os >>> os.emviron['PYTHONPATH'] = '/path1:/path2' >>> print(sys.path) ['', '/path1', '/usr/lib/...', ...] Изменений нет. Но давайте запустим дочерний процесс и посмотрим там >>> os.system('python3') # теперь мы находимся в другом процессе >>> import sys >>> print(sys.path) ['', '/path1', '/path2', '/usr/lib/...', ...] Тоже самое будет и с subprocess, так как по умолчанию текущее окружение тоже наследуется. >>> import subprocess >>> subprocess.call(['python3', '-c', 'import sys;print(sys.path)']) ['', '/path1', '/path2', '/usr/lib/...', ...] ______________________ Лучшей практикой является передача энвайронмента явно через аргумент env! import subprocess subprocess.call(cmd, env={'PYTHONPATH': '...'}) Это поможет точно понимать какое окружение будет у запускаемого процесса и при этом не изменять окружение текущего процесса. #basic

Hashtags

Резултати

Пронајдени 1 слични објави

Пребарај: #oecdinsights

当前筛选 #oecdinsights清除筛选
AI & Law

@ai_and_law · Post #75 · 04.08.2023 г., 07:04

The Complexity of Regulating Foundation Models in the AI Act Hello, AI & Law community! Kai Zenner, the Head of Office and Digital Policy Adviser at the Office of MEP Axel Voss, shared his opinion on the OECD website about regulating foundation models in the AI Act. 🔹 The Existing Gap: The proposed AI Act by the European Commission, created before foundation models gained prominence in AI, doesn't explicitly cover these versatile models. Their potential for diverse, unforeseen purposes makes it tricky to fit them into the current product safety approach. The Act's use case approach, limiting AI systems to specific risk classes, is too inflexible for the latest foundation models that can handle various tasks. This creates a regulatory gap that needs to be addressed. 🔹 Positive Progress: The European Parliament has taken a proactive step to tackle this issue by introducing Article 28b, which adds a regulatory layer specifically for foundation models. This article outlines nine essential obligations for developers, including identifying risks, testing, evaluation, and thorough documentation. These measures aim to strike a balance between ensuring safety and fostering innovation in the AI landscape. 🔹 Targeted Approach: A crucial consideration is to avoid putting too much burden on smaller providers while still effectively regulating foundation models. Zenner proposes adopting a systemic approach, targeting only a small number of highly capable and relevant foundation models under the AI Act. This strategy could be similar to how Very Large Online Platforms are designated under the Digital Services Act, ensuring a balanced and efficient regulatory framework. #AIRegulation#FoundationModels#AIAct#AIInnovation#AICommunity#TechLaw#OECDInsights